package com.hong.spring.aop;

import com.hong.spring.aop.service.OrderService;
import com.hong.spring.aop.service.UserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Auther: csh
 * @Date: 2020/7/14 16:46
 * @Description:基于注解的aop测试
 */
public class SpringAopAnnotationApp {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:aop/spring-aop-annotation.xml");
        OrderService orderService = ctx.getBean(OrderService.class);
        orderService.pay("xxxxx1",0);


        System.out.println("==================================");
        orderService.pay("xxxxx2",100);
        ctx.close();
    }
}
